Optimal. Leaf size=119 \[ -\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{a^4 d}-\frac {b \cos ^2(c+d x)}{a^3 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {b^2 \left (a^2-b^2\right )}{a^5 d (b+a \cos (c+d x))}+\frac {2 b \left (a^2-2 b^2\right ) \log (b+a \cos (c+d x))}{a^5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3957, 2916, 12,
908} \begin {gather*} -\frac {b \cos ^2(c+d x)}{a^3 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {b^2 \left (a^2-b^2\right )}{a^5 d (a \cos (c+d x)+b)}+\frac {2 b \left (a^2-2 b^2\right ) \log (a \cos (c+d x)+b)}{a^5 d}-\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 908
Rule 2916
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sin ^3(c+d x)}{(a+b \sec (c+d x))^2} \, dx &=\int \frac {\cos ^2(c+d x) \sin ^3(c+d x)}{(-b-a \cos (c+d x))^2} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x^2 \left (a^2-x^2\right )}{a^2 (-b+x)^2} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac {\text {Subst}\left (\int \frac {x^2 \left (a^2-x^2\right )}{(-b+x)^2} \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=\frac {\text {Subst}\left (\int \left (a^2 \left (1-\frac {3 b^2}{a^2}\right )-\frac {b^2 \left (-a^2+b^2\right )}{(b-x)^2}+\frac {2 b \left (-a^2+2 b^2\right )}{b-x}-2 b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=-\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{a^4 d}-\frac {b \cos ^2(c+d x)}{a^3 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {b^2 \left (a^2-b^2\right )}{a^5 d (b+a \cos (c+d x))}+\frac {2 b \left (a^2-2 b^2\right ) \log (b+a \cos (c+d x))}{a^5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 167, normalized size = 1.40 \begin {gather*} \frac {-9 a^4+60 a^2 b^2-24 b^4-8 \left (a^4-3 a^2 b^2\right ) \cos (2 (c+d x))-4 a^3 b \cos (3 (c+d x))+a^4 \cos (4 (c+d x))+48 a^2 b^2 \log (b+a \cos (c+d x))-96 b^4 \log (b+a \cos (c+d x))+24 a b \cos (c+d x) \left (-a^2+3 b^2+2 \left (a^2-2 b^2\right ) \log (b+a \cos (c+d x))\right )}{24 a^5 d (b+a \cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 112, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right ) a^{2}}{3}-b \left (\cos ^{2}\left (d x +c \right )\right ) a -a^{2} \cos \left (d x +c \right )+3 b^{2} \cos \left (d x +c \right )}{a^{4}}+\frac {b^{2} \left (a^{2}-b^{2}\right )}{a^{5} \left (b +a \cos \left (d x +c \right )\right )}+\frac {2 b \left (a^{2}-2 b^{2}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{a^{5}}}{d}\) | \(112\) |
default | \(\frac {\frac {\frac {\left (\cos ^{3}\left (d x +c \right )\right ) a^{2}}{3}-b \left (\cos ^{2}\left (d x +c \right )\right ) a -a^{2} \cos \left (d x +c \right )+3 b^{2} \cos \left (d x +c \right )}{a^{4}}+\frac {b^{2} \left (a^{2}-b^{2}\right )}{a^{5} \left (b +a \cos \left (d x +c \right )\right )}+\frac {2 b \left (a^{2}-2 b^{2}\right ) \ln \left (b +a \cos \left (d x +c \right )\right )}{a^{5}}}{d}\) | \(112\) |
risch | \(\frac {8 i b^{3} c}{a^{5} d}+\frac {4 i b^{3} x}{a^{5}}-\frac {b \,{\mathrm e}^{2 i \left (d x +c \right )}}{4 a^{3} d}-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )}}{8 a^{2} d}+\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} b^{2}}{2 a^{4} d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 a^{2} d}+\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} b^{2}}{2 a^{4} d}-\frac {b \,{\mathrm e}^{-2 i \left (d x +c \right )}}{4 a^{3} d}-\frac {4 i b c}{a^{3} d}-\frac {2 i b x}{a^{3}}-\frac {2 b^{2} \left (-a^{2}+b^{2}\right ) {\mathrm e}^{i \left (d x +c \right )}}{a^{5} d \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}+\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a^{3} d}-\frac {4 b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{a^{5} d}+\frac {\cos \left (3 d x +3 c \right )}{12 d \,a^{2}}\) | \(301\) |
norman | \(\frac {-\frac {\left (4 a^{4}-8 b \,a^{3}+12 b^{2} a^{2}+16 b^{3} a -24 b^{4}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{4} d b}+\frac {\left (4 a^{3}+4 b \,a^{2}+8 b^{2} a -24 b^{3}\right ) \left (a +b \right )}{6 a^{4} b d}-\frac {\left (4 a^{4}-12 b \,a^{3}+4 b^{2} a^{2}+8 b^{3} a -24 b^{4}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a^{4} b d}+\frac {\left (4 a^{4}+12 b \,a^{3}+4 b^{2} a^{2}-8 b^{3} a -24 b^{4}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a^{4} d b}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )}-\frac {2 b \left (a^{2}-2 b^{2}\right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{5} d}+\frac {2 b \left (a^{2}-2 b^{2}\right ) \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )}{a^{5} d}\) | \(336\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 112, normalized size = 0.94 \begin {gather*} \frac {\frac {3 \, {\left (a^{2} b^{2} - b^{4}\right )}}{a^{6} \cos \left (d x + c\right ) + a^{5} b} + \frac {a^{2} \cos \left (d x + c\right )^{3} - 3 \, a b \cos \left (d x + c\right )^{2} - 3 \, {\left (a^{2} - 3 \, b^{2}\right )} \cos \left (d x + c\right )}{a^{4}} + \frac {6 \, {\left (a^{2} b - 2 \, b^{3}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{5}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.70, size = 150, normalized size = 1.26 \begin {gather*} \frac {2 \, a^{4} \cos \left (d x + c\right )^{4} - 4 \, a^{3} b \cos \left (d x + c\right )^{3} + 9 \, a^{2} b^{2} - 6 \, b^{4} - 6 \, {\left (a^{4} - 2 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (a^{3} b - 6 \, a b^{3}\right )} \cos \left (d x + c\right ) + 12 \, {\left (a^{2} b^{2} - 2 \, b^{4} + {\left (a^{3} b - 2 \, a b^{3}\right )} \cos \left (d x + c\right )\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{6 \, {\left (a^{6} d \cos \left (d x + c\right ) + a^{5} b d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 139, normalized size = 1.17 \begin {gather*} \frac {2 \, {\left (a^{2} b - 2 \, b^{3}\right )} \log \left ({\left | -a \cos \left (d x + c\right ) - b \right |}\right )}{a^{5} d} + \frac {a^{2} b^{2} - b^{4}}{{\left (a \cos \left (d x + c\right ) + b\right )} a^{5} d} + \frac {a^{4} d^{5} \cos \left (d x + c\right )^{3} - 3 \, a^{3} b d^{5} \cos \left (d x + c\right )^{2} - 3 \, a^{4} d^{5} \cos \left (d x + c\right ) + 9 \, a^{2} b^{2} d^{5} \cos \left (d x + c\right )}{3 \, a^{6} d^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 113, normalized size = 0.95 \begin {gather*} -\frac {\cos \left (c+d\,x\right )\,\left (\frac {1}{a^2}-\frac {3\,b^2}{a^4}\right )-\frac {{\cos \left (c+d\,x\right )}^3}{3\,a^2}+\frac {b\,{\cos \left (c+d\,x\right )}^2}{a^3}-\frac {\ln \left (b+a\,\cos \left (c+d\,x\right )\right )\,\left (2\,a^2\,b-4\,b^3\right )}{a^5}+\frac {b^4-a^2\,b^2}{a\,\left (\cos \left (c+d\,x\right )\,a^5+b\,a^4\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________